package com.coldwindblows.blog.service;

import com.coldwindblows.blog.pojo.UserDo;

/**
 * Created by ColdWindBlows on 2018/07/01
 *
 */
public interface IUserService {
	/**
	 * 保存用户
	 * @param user 用户数据
	 * @return
	 */
	Integer insertUser(UserDo user);
	/**
	 * 通过uid查找对象
	 * @param uid
	 * @return
	 */
	UserDo queryUserById(Integer uid);
	/**
	 * 用户登录
	 * @param username
	 * @param password
	 * @return
	 */
	UserDo login(String username, String password);
	/**
	 * 用户注册
	 * @param username
	 * @param password
	 * @param nickname
	 * @param email
	 * @return
	 */
	UserDo regiest(String username, String password, String nickname, String email);
	/**
	 * 根据主键更新user对象
	 * @param user
	 * @return
	 */
	boolean updateByUid(UserDo user);
}
